#!/bin/bash
#read -p "请输入要查询的IP地址:" ip
ip=$1
wget -q http://www.ip138.com/ips.asp?ip=$ip&action=2
sleep 1
echo "$ip 的地理位置是：`cat ips.asp\?ip\=$ip|grep "<li>"|awk -F '<li>' '{print $2,$3,$4}'|awk -F '</li>' '{print $1,$2,$3}'`"
rm -f ips.asp\?ip\=$ip